<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img {
            position: absolute;
            left: 0;
            top: 50px;
        }

        #demo {
            width: 1000px;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <img src="images/aside.jpg" alt="" id="pic" />
    <div id="demo">
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
        <p>天王盖地虎，小鸡炖蘑菇</p>
    </div>
    <script src="../js/scroll.js"></script>
</body>
<body>
    <script>
        var oPic=document.querySelector("#pic")
        window.addEventListener("scroll",function(){
            var scrollTop=utils.getScroll().top;
            utils.animate(oPic,{top:scrollTop+50})
        })
    </script>
</body>
</html>



